import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
export default new Router({
	mode:'hash',
	routes: [		
		{
			path: '/index',
			component:()=>import(/* webpackChunkName: "main" */ '../components/admin/Index.vue'),
			children:[
				{
					path:'/index/goods',
					component:()=>import(/* webpackChunkName: "main" */ '../components/admin/Goods.vue'),
				},
				{
					path:'/index/articles',
					component:()=>import(/* webpackChunkName: "main" */ '../components/admin/Articles.vue'),
				},
				{
					path:'/index/loginLogs',
					component:()=>import(/* webpackChunkName: "loginLogs" */ '../components/admin/LoginLogs.vue'),
				},
				{
					path:'/',                    
					redirect: '/index/goods'
				},
			]
		},
		{
			path: '/login',
			component:()=>import(/* webpackChunkName: "main" */ '../components/admin/Login.vue'),
		},
		{
			path:'/',                    
			redirect: '/index'
		},
	]
});